﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Maticsoft.Web
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            if (RadioButtonList1.Text == "外联部经理")
            {
                Session["group"] = "外联部经理";
            }
            else if (RadioButtonList1.Text == "销售部经理")
            {
                Session["group"] = "销售部经理";
            }
            else if (RadioButtonList1.Text == "生产部经理")
            {
                Session["group"] = "生产部经理";
            }
            else if (RadioButtonList1.Text == "超级管理员")
            {
                Session["group"] = "超级管理员";
            }



            Response.Redirect("~/Main.aspx");
        }


        public bool validate(string str)
        {
            string strobj;
            bool ss = false;
            for (int i = 0; i < str.Length; i++)
            {
                strobj = str.Substring(i, 1);
                if (strobj == "%" || strobj == "&" || strobj == "'" || strobj == "|" || strobj == "<" || strobj == ">")
                {
                    ss = true;
                    break;
                }
            }
            return ss;
        }

    }
}